<?php
include("../lib/db.lib");
include("../lib/std.lib");
include("user_check.php");

$cat_id=param("cat_id");
$pd_id=param("pd_id");

$title=product_get_title($shop_id,$pd_id);
if($cat_id){
	cat_del_product($cat_id,$pd_id);
	cat_set_product_num_local($shop_id,$cat_id);
}else{
	product_del($shop_id,$pd_id);
}

//echo "over";

redirect("Shop $shop_id : Product <i>$title</i>($pd_id)  deleted from $cat_id.","./p_cat_pd_list.php?cat_id=$cat_id",2);

?>
